/**
 * 
 */
package com.zhmy.xmgl;

import org.gocom.components.coframe.rights.dataset.CapUser;

import com.eos.das.entity.ExpressionHelper;
import com.eos.das.entity.IDASCriteria;
import com.eos.das.entity.criteria.CriteriaType;
import com.eos.foundation.PageCond;
import com.eos.spring.DASDaoSupport;
import com.primeton.das.entity.impl.hibernate.type.ComponentType;
import com.primeton.data.sdo.impl.DataObjectImpl;
import com.zhmy.xmgl.ZHMY_PROJECT_MANAGE.ZhmySchedule;
import com.zhmy.xmgl.zhmytask.ZhmyProject;
import com.zhmy.xmgl.zhmytask.ZhmyVersionChange;
import com.zhmy.xmgl.zhmytask.impl.ZhmyProjectImpl;
import com.zhmy.xmgl.zhmytask.impl.ZhmyVersionChangeImpl;

import commonj.sdo.DataObject;
import commonj.sdo.helper.DataFactory;
import commonj.sdo.helper.DataHelper;


/**
 * <pre>
 * Title: 程序的中文名称
 * Description: 程序功能的描述
 * </pre>
 * @author Robert
 * @version 1.00.00
 * 
 */
/*
 * 修改历史
 * $log$
 */
public class ZhmyVersionChangeDao extends DASDaoSupport {

	public ZhmyVersionChange[] queryZhmySchedules(CriteriaType criteriaType, PageCond pageCond) {
		
		//IDASCriteria dasCriteria = getDASTemplate().createCriteria(ZhmyVersionChange.QNAME);
		//dasCriteria.add(ExpressionHelper.eq("userId", userId));
		
		IDASCriteria dasCriteria = getDASTemplate().criteriaTypeToDASCriteria(criteriaType);
		return getDASTemplate().queryEntitiesByCriteriaEntityWithPage(ZhmyVersionChange.class, dasCriteria, pageCond);
	}
	
	public ZhmyVersionChange[] queryZhmyVersionChangeByProjectId(Long projectid) {
		
		ZhmyVersionChange dataOjbect = new ZhmyVersionChangeImpl();
		ZhmyProject zhmyProject = new ZhmyProjectImpl();
		zhmyProject.setProjectId(projectid);
		dataOjbect.setZhmyProject(zhmyProject);
		
		ZhmyVersionChange[] tt = null;
		
		//ZhmyVersionChange oo = DataFactory;//ZhmyVersionChange.FACTORY.create();

		tt = getDASTemplate().queryEntitiesByTemplate( ZhmyVersionChange.class, dataOjbect);
		
		return tt;
	}

}
